<%--<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">--%>
<%@ page contentType="text/html;charset=UTF-8" language="java"  pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="spring" uri="/WEB-INF/lib/spring.tld"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f" %>
<%@ taglib prefix="z" uri="/WEB-INF/lib/zerdoor.tld"%>
<c:set value="${pageContext.request.contextPath}" var="path" scope="page"/>


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><spring:message code='artist_order.title.msg' /></title>
    <link href="${path}/style/acg/css/style.css" rel="stylesheet" type="text/css" />

    <script src="${path}/js/jquery.min.js" type="text/javascript"></script>
    <%--<script type="text/javascript" src="${path}/style/acg/js/common.js"></script>--%>

    <script type="text/javascript">

        $(function(){
            f_init();
        });

        function f_init(){
            //绑定选择框事件
            $(".chkinput").click(function(){

                if(!$(this).attr("checked")){
                    $(this).attr("checked","checked");
                }else{
                    $(this).removeAttr("checked");
                }

            });
        }

        // 购买
        function f_buy(){

            if("${curUser.userId}" == null || "${curUser.userId}" == ""){

                alert("<spring:message code='artist_home.alert.tipLogin' />");
                return;
            }

//            var email = $.trim($("#email").val());
//            var phone = $.trim($("#phone").val());
//            var qq = $.trim($("#qq").val());
//
//            if(email == "" || phone == ""){
//                alert("邮箱和手机号不能为空！");
//                return;
//            }
//
//            var emailRex= /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;
//            if(!emailRex.test(email)){
//                alert("邮箱地址格式不正确！");
//                return;
//            }

            if(!$(".chkinput").attr("checked")){

                alert("<spring:message code='artist_order.alert.agree' />");
                return;
            }

            window.location.href = "${path}/artistPersonalHome/publishAndPay.html?production_id=${productionInfo.works_id}";



        }

        //条例
        function f_ACGProvision(){



                $("#provisionDiv").show();

        }



    </script>
</head>

<body>
<div class="header">
    <jsp:include page="../public/header.jsp">
        <jsp:param    name="home"    value="dddd"    />
    </jsp:include>
</div>
<div id="container">
    <div class="wrapper">
    	<div class="confirmorder_box">
        	<div class="confirmorder_tit"><spring:message code='artist_order.msg.confirmOrder' /></div>
            <div class="confirmorder_prolist">
            	<dl class="clearfix">
                	<dt><img src="${path}/${productionInfo.cover}" width="292" height="180" /></dt>
                    <dd>
                    	<h2>${productionInfo.works_name}<span><a href="${path}/artistPersonalHome/browseProduction.html?production_id=${productionInfo.works_id}"><spring:message code='artist_order.msg.comeBack' /></a></span></h2>
                        <h3><spring:message code='artist_production.msg.sellingPrice' />：￥${productionInfo.price}</h3>
                        <div class="intro">
                        	<h4><spring:message code='artist_order.msg.synopsis' /></h4>
                          	<div>
                                ${productionInfo.description}
                            </div>
                        </div>
                    </dd>
                </dl>
            </div>
            <div class="confirmorder_contact">
            	<%--<div class="confirmorder_contactform">--%>
                	<%--<ul>--%>
                    	<%--<li>收货联系方式</li>--%>
                        <%--<li class="clearfix">--%>
                        	<%--<dl class="clearfix">--%>
                            	<%--<dt>邮箱：</dt>--%>
                                <%--<dd><input name="email" id="email" value="" /></dd>--%>
                            <%--</dl>--%>
                        <%--</li>--%>
                        <%--<li class="clearfix">--%>
                        	<%--<dl class="clearfix">--%>
                            	<%--<dt>手机：</dt>--%>
                                <%--<dd><input name="phone" id="phone" value="" /></dd>--%>
                            <%--</dl>--%>
                        <%--</li>--%>
                        <%--<li class="clearfix">--%>
                        	<%--<dl class="clearfix">--%>
                            	<%--<dt>QQ：</dt>--%>
                                <%--<dd><input name="qq" id="qq" value="" /></dd>--%>
                            <%--</dl>--%>
                        <%--</li>--%>
                    <%--</ul>--%>
                <%--</div>--%>
                <div class="confirmorder_submit" style="width: 100%;">
                	<div class="totalmoney"><spring:message code='artist_order.msg.amountsPayable' />：<em>￥${productionInfo.price}</em></div>
                    <div id="provisionDiv" style="width: 1150px;height: 200px; text-align:left; OVERFLOW: auto; display: none; ">
                        ${productionInfo.ACGProvision}
                    </div>
                    <p>
                    	<input type="checkbox" checked="checked" id="" name="" value="" class="chkinput" />
                        <label><spring:message code='artist_order.msg.agreeAbide' /><a href="javascript:void(0);" onclick="f_ACGProvision()"> <spring:message code='artist_order.msg.provision' /> </a></label>
                    </p>
                    <p><input type="button" onclick="f_buy()" id="" name="" value="<spring:message code='artist_order.button.submitOrder' />" class="submitorder" /></p>
                </div>
                <div class="clr"></div>
            </div>
        </div>
    </div>


</div>
<div id="footer">
    <!--content-->
    <jsp:include page="../public/footer.jsp"></jsp:include>

</div>
</body>
</html>
